package dTraceGUI;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Window;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class LoginSettings extends JFrame {

	private JPanel contentPane;
	private JTextField loginField;
	private JPasswordField passwordField;
	/**
	 * Launch the application.
	 */
	/*
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					LoginSettings frame = new LoginSettings();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
	*/
	/**
		 * Launch the application.
		 */
		/*
		public static void main(String[] args) {
			EventQueue.invokeLater(new Runnable() {
				public void run() {
					try {
						LoginSettings frame = new LoginSettings();
						frame.setVisible(true);
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			});
		}
		*/
		/**
		 * Create the frame.
		 */
		public LoginSettings() {
			setResizable(false);
			setTitle("Login");
			setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
			setBounds(100, 100, 450, 300);
			contentPane = new JPanel();
			contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
			setContentPane(contentPane);
			GridBagLayout gbl_contentPane = new GridBagLayout();
			gbl_contentPane.columnWidths = new int[] { 215, 0, 0, 0, 0, 0, 0 };
			gbl_contentPane.rowHeights = new int[] { 32, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
			gbl_contentPane.columnWeights = new double[] { 1.0, 0.0, 0.0, 0.0, 0.0,
					0.0, Double.MIN_VALUE };
			gbl_contentPane.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0,
					0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
			contentPane.setLayout(gbl_contentPane);
	
			JLabel lblEinstellungen = new JLabel("Login");
			GridBagConstraints gbc_lblEinstellungen = new GridBagConstraints();
			gbc_lblEinstellungen.insets = new Insets(0, 0, 5, 5);
			gbc_lblEinstellungen.gridx = 0;
			gbc_lblEinstellungen.gridy = 0;
			contentPane.add(lblEinstellungen, gbc_lblEinstellungen);
	
			JLabel lblLogin = new JLabel("Login");
			GridBagConstraints gbc_lblLogin = new GridBagConstraints();
			gbc_lblLogin.anchor = GridBagConstraints.WEST;
			gbc_lblLogin.insets = new Insets(0, 0, 5, 5);
			gbc_lblLogin.gridx = 0;
			gbc_lblLogin.gridy = 1;
			contentPane.add(lblLogin, gbc_lblLogin);
	
			loginField = new JTextField();
			GridBagConstraints gbc_loginField = new GridBagConstraints();
			gbc_loginField.fill = GridBagConstraints.HORIZONTAL;
			gbc_loginField.insets = new Insets(0, 0, 5, 5);
			gbc_loginField.gridx = 0;
			gbc_loginField.gridy = 2;
			contentPane.add(loginField, gbc_loginField);
			loginField.setColumns(10);
	
			JLabel lblPasswort = new JLabel("Passwort");
			GridBagConstraints gbc_lblPasswort = new GridBagConstraints();
			gbc_lblPasswort.anchor = GridBagConstraints.WEST;
			gbc_lblPasswort.insets = new Insets(0, 0, 5, 5);
			gbc_lblPasswort.gridx = 0;
			gbc_lblPasswort.gridy = 3;
			contentPane.add(lblPasswort, gbc_lblPasswort);
	
			passwordField = new JPasswordField();
			GridBagConstraints gbc_passwordField = new GridBagConstraints();
			gbc_passwordField.fill = GridBagConstraints.BOTH;
			gbc_passwordField.insets = new Insets(0, 0, 5, 5);
			gbc_passwordField.gridx = 0;
			gbc_passwordField.gridy = 4;
			contentPane.add(passwordField, gbc_passwordField);
	
			JRadioButton rdbtnLoginSpeichern = new JRadioButton("Login speichern");
			GridBagConstraints gbc_rdbtnLoginSpeichern = new GridBagConstraints();
			gbc_rdbtnLoginSpeichern.anchor = GridBagConstraints.WEST;
			gbc_rdbtnLoginSpeichern.insets = new Insets(0, 0, 5, 5);
			gbc_rdbtnLoginSpeichern.gridx = 0;
			gbc_rdbtnLoginSpeichern.gridy = 5;
			contentPane.add(rdbtnLoginSpeichern, gbc_rdbtnLoginSpeichern);
			
			JPanel panel = new JPanel();
			GridBagConstraints gbc_panel = new GridBagConstraints();
			gbc_panel.insets = new Insets(0, 0, 0, 5);
			gbc_panel.fill = GridBagConstraints.BOTH;
			gbc_panel.gridx = 0;
			gbc_panel.gridy = 8;
			contentPane.add(panel, gbc_panel);
			GridBagLayout gbl_panel = new GridBagLayout();
			gbl_panel.columnWidths = new int[]{0, 0, 0, 0};
			gbl_panel.rowHeights = new int[]{0, 0};
			gbl_panel.columnWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};
			gbl_panel.rowWeights = new double[]{0.0, Double.MIN_VALUE};
			panel.setLayout(gbl_panel);
			
			JButton btnNewButton = new JButton("Speichern");
			GridBagConstraints gbc_btnNewButton = new GridBagConstraints();
			gbc_btnNewButton.insets = new Insets(0, 0, 0, 5);
			gbc_btnNewButton.gridx = 1;
			gbc_btnNewButton.gridy = 0;
			panel.add(btnNewButton, gbc_btnNewButton);
			
			JButton btnNewButton_1 = new JButton("Abbrechen");
			btnNewButton_1.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					dispose();
				}
			});
			GridBagConstraints gbc_btnNewButton_1 = new GridBagConstraints();
			gbc_btnNewButton_1.gridx = 2;
			gbc_btnNewButton_1.gridy = 0;
			panel.add(btnNewButton_1, gbc_btnNewButton_1);
			
		}
		
	}